// 获取所有可借阅书籍
const { router } = require('../../koa/koa-main')
const { getAllAvaiBooks } = require('../../services/book')

router.get('/getAllAvaiBooks', async (ctx, next) => {
  const { data } = await getAllAvaiBooks(ctx.request.query)
  ctx.response.body = data
  await next()
})
